package cn.yunyichina.provider.base.entity;


/**
 * 订单对象扩展
 * @author adriftor
 *
 */
public class OrderExt extends Order {
	
	/**
	 * 创建
	 */
	public static final Short ORDER_STATUS_CREATE = 1;
	/**
	 * 待写入
	 */
	public static final Short ORDER_STATUS_WAIT_WRITE = 2;
	
	/**
	 * 成功
	 */
	public static final Short ORDER_STATUS_SUCCESS = 3;
	/**
	 * 失败
	 */
	public static final Short ORDER_STATUS_FAIL = 4;
	/**
	 * 异常
	 */
	public static final Short ORDER_STATUS_EXCEPTION = 5;
	/**
	 * 变更
	 */
	public static final Short ORDER_STATUS_CHANGE = 6;
	/**
	 * 取消
	 */
	public static final Short ORDER_STATUS_CANCEL = 7;
	/**
	 * 超时
	 */
	public static final Short ORDER_STATUS_TIMEOUT = 8;

	/**
	 * 1-未支付
	 */
	public static final Short ORDER_PAY_STATUS_NOT_PAY = 1;
	/**
	 * 2-支付受理（调起收银台）
	 */
	public static final Short ORDER_PAY_STATUS_ACCESS = 2;
	/**
	 * 3-已支付（收到支付成功的回调）
	 */
	public static final Short ORDER_PAY_STATUS_PAYED = 3;
	/**
	 *  4-支付失败
	 */
	public static final Short ORDER_PAY_STATUS_FAIL = 4;
	/**
	 * 5-待退费
	 */
	public static final Short ORDER_PAY_STATUS_WAIT_REFUND = 5;
	/**
	 *  6-退费受理
	 */
	public static final Short ORDER_PAY_STATUS_ACCESS_REFUND = 6;
	/**
	 * 7-已退费
	 */
	public static final Short ORDER_PAY_STATUS_REFUNDED = 7;
	/**
	 * 8-部分退费
	 */
	public static final Short ORDER_PAY_STATUS_PART_REFUND = 8;
	/**
	 * 9-退费失败
	 */
	public static final Short ORDER_PAY_STATUS_REFUND_FAIL = 9;
	

	/**
	 * 1:挂号
	 */
	public static final Short ORDER_TYPE_REGISTER = 1;
	/**
	 * 2:取号
	 */
	public static final Short ORDER_TYPE_TAKENO = 2;
	/**
	 * 3:门诊缴费
	 */
	public static final Short ORDER_TYPE_CLINIC = 3;
	/**
	 * 4:住院缴费
	 */
	public static final Short ORDER_TYPE_IN_HOSPITAL = 4;
	/**
	 * 5:mini支付
	 */
	public static final Short ORDER_TYPE_MINI = 5;
	/**
	 * 6:当面付
	 */
	public static final Short ORDER_TYPE_FACE = 6;
	/**
	 * 7:扫码付
	 */
	public static final Short ORDER_TYPE_SCAN = 7;
	/**
	 *  8:预约平台
	 */
	public static final Short ORDER_TYPE_RESERVATION = 8;

	/**
	 * 9:骨科大会
     */
	public static final Short ORDER_TYPE_BONE = 9;
	

	/**
	 * 1-创建
	 */
	public void setOrderStatusCreate() {
		super.setOrderStatus(ORDER_STATUS_CREATE);
	}
	/**
	 * 2-待写单
	 */
	public void setOrderStatusWaitWrite() {
		super.setOrderStatus(ORDER_STATUS_WAIT_WRITE);
	}
	/**
	 * 3-成功
	 */
	public void setOrderStatusSuccess() {
		super.setOrderStatus(ORDER_STATUS_SUCCESS);
	}
	/**
	 * 4-失败
	 */
	public void setOrderStatusFail() {
		super.setOrderStatus(ORDER_STATUS_FAIL);
	}
	/**
	 * 5-异常
	 */
	public void setOrderStatusException() {
		super.setOrderStatus(ORDER_STATUS_EXCEPTION);
	}
	/**
	 * 6-变更
	 */
	public void setOrderStatusChange() {
		super.setOrderStatus(ORDER_STATUS_CHANGE);
	}
	/**
	 * 7-取消
	 */
	public void setOrderStatusCancel() {
		super.setOrderStatus(ORDER_STATUS_CANCEL);
	}
	/**
	 * 8-超时
	 */
	public void setOrderStatusTimeOut() {
		super.setOrderStatus(ORDER_STATUS_TIMEOUT);
	}
	
	/**
	 * 1:挂号
	 */
	public void setOrderTypeRegister() {
		super.setOrderType(ORDER_TYPE_REGISTER);
	}
	
	/**
	 * 2:取号
	 */
	public void setOrderTypeTakeNo() {
		super.setOrderType(ORDER_TYPE_TAKENO);
	}
	
	/**
	 * 3:门诊缴费
	 */
	public void setOrderTypeClinic() {
		super.setOrderType(ORDER_TYPE_CLINIC);
	}
	
	/**
	 * 4:住院缴费
	 */
	public void setOrderTypeInHospital() {
		super.setOrderType(ORDER_TYPE_IN_HOSPITAL);
	}

	/**
	 * 5:mini支付
	 */
	public void setOrderTypeMini() {
		super.setOrderType(ORDER_TYPE_MINI);
	}
	
	/**
	 * 6:当面付
	 */
	public void setOrderTypeFace() {
		super.setOrderType(ORDER_TYPE_FACE);
	}
	
	/**
	 * 7:扫码付
	 */
	public void setOrderTypeScan() {
		super.setOrderType(ORDER_TYPE_SCAN);
	}
	
	/**
	 * 8:预约平台
	 */
	public void setOrderTypeReservation() {
		super.setOrderType(ORDER_TYPE_RESERVATION);
	}
	
	
	/**
	 * 1-未支付
	 */
	public void setPayStatusNotPay() {
		super.setPayStatus(ORDER_PAY_STATUS_NOT_PAY);
	}
	
	/**
	 * 2-支付受理（调起收银台）
	 */
	public void setPayStatusAccess() {
		super.setPayStatus(ORDER_PAY_STATUS_ACCESS);
	}
	
	/**
	 * 3-已支付（收到支付成功的回调）
	 */
	public void setPayStatusPayed() {
		super.setPayStatus(ORDER_PAY_STATUS_PAYED);
	}
	
	/**
	 * 4-支付失败
	 */
	public void setPayStatusFail() {
		super.setPayStatus(ORDER_PAY_STATUS_FAIL);
	}
	
	/**
	 *  5-待退费
	 */
	public void setPayStatusWaitRefund() {
		super.setPayStatus(ORDER_PAY_STATUS_WAIT_REFUND);
	}
	
	/**
	 * 6-退费受理
	 */
	public void setPayStatusAccessRefund() {
		super.setPayStatus(ORDER_PAY_STATUS_ACCESS_REFUND);
	}
	
	/**
	 * 7-已退费
	 */
	public void setPayStatusRefunded() {
		super.setPayStatus(ORDER_PAY_STATUS_REFUNDED);
	}
	/**
	 * 8-部分退费
	 */
	public void setPayStatusPartRefund() {
		super.setPayStatus(ORDER_PAY_STATUS_PART_REFUND);
	}
	/**
	 * 9-退费失败
	 */
	public void setPayStatusRefundFail() {
		super.setPayStatus(ORDER_PAY_STATUS_REFUND_FAIL);
	}

	private String promoterId;//推广人员id

	public String getPromoterId() {
		return promoterId;
	}

	public void setPromoterId(String promoterId) {
		this.promoterId = promoterId;
	}

	private String reserveNo;//预约号码

	public String getReserveNo() {
		return reserveNo;
	}

	public void setReserveNo(String reserveNo) {
		this.reserveNo = reserveNo;
	}

	/*医保结算标记 0：未结算 1：结算成功 2：结算失败*/
	private Short insuranceSettleFlag;
	public void setInsuranceSettleFlag(Short insuranceSettleFlag) {
		this.insuranceSettleFlag = insuranceSettleFlag;
	}
	public Short getInsuranceSettleFlag() {
		return insuranceSettleFlag;
	}

	/*支付是否通知并处理(0：否，1：是)*/
	private Integer isPayHandled;
	public void setIsPayHandled(Integer isPayHandled) {
		this.isPayHandled = isPayHandled;
	}
	public Integer getIsPayHandled() {
		return isPayHandled;
	}

	/* 下单时间  */
	private String orderTime;
	public String getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}
}
